<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
$(document).ready(function(){
	
	 $("#writeForm").submit(function(){
		if($(":text[name=title]").val()==""){
			alert("제목을 입력해 주세요");
			return false;
		}else if($("#content").val()==""){
			alert("내용을 입력해 주세요");
			return false;
		}
	}); 
	
	$("#cancle_btn").click(function(){
		location.href="${initParam.root }/board_newslist.do";
});
	
	});
</script>


<form method="post"action="${initParam.root }/board_newswrite.do" id="writeForm">
<center>
title : <input type="text" name="title" size="62%"><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<textarea rows="10" cols="53" id="content" name="content" ></textarea><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" value="등록">
</form>
<input type="button" id="cancle_btn" value="취소">
</center>
